package app.error;

import com.dj.common.types.StatusType;
import lombok.Getter;

@Getter
public enum GatewayErrorType implements StatusType {

    SYSTEM_ERROR(500, "系统异常", 500),
    GATEWAY_NOT_FOUND_SERVICE(404, "服务未找到", 404),
    UNAUTHORIZED(401, "未授权", 401),
    GATEWAY_ERROR(100000, "网关异常", 500),
    GATEWAY_CONNECT_TIME_OUT(100001, "网关超时", 500);

    /**
     * 错误类型码
     */
    private int code;
    /**
     * 错误类型描述信息
     */
    private String msg;

    /**
     * Http状态码
     */
    private int status;

    GatewayErrorType(int code, String msg, int status) {
        this.code = code;
        this.msg = msg;
        this.status = status;
    }

}
